package net.shopxx.exception;

public enum ErrorCode implements BasicErrorDesc {
    BASICPUBLIC_BEGIN("", 0),
    INVALID_PARAMETERS("请检查信息是否填写完整（参数错误）", 10),
    MTHOD_NOT_FOUND("方法不存在", 11),
    MTHOD_NOT_ALLOWED("方法不可用[GET or POST or ?]", 12),
    NO_DATA_EXIST("数据不存在！", 13),
    DATA_EXIST("数据已存在！", 14),
    DEL_FAIL("删除失败", 15),
    INVALID_SQL_ORDER("排序参数错误", 16),
    IOEXCEPTION_ERROR("", 88),
    DOCUMENTEXCEPTION_ERROR("", 89),
    BASICPUBLIC_END("", 90),
    UNKNOWN_PAY_WAY("未知支付类型", 92),
    ORDER_FEE_NOT_ZERO("订单总价不能为0", 93),
    INTERVAL_TYPE_NOT_EMPTY("时段不能为空", 94),
    INTERVAL_TYPE_ERROR("时段参数错误", 95),
    WELFARE_TIMES_TYPE_IS_ZERO("当前类型支付次数为0", 96),
    WELFARE_TIMES_TOTAL_IS_ZERO("支付总次数为0", 97),
    WECHAT_NOT_BIND("微信未入驻,无法使用", 98),
    ALIPAY_NOT_BIND("支付宝未入驻,无法使用", 99),
    ORDER_IS_NOT_EXIST("订单不存在", 100),
    ORDER_IS_PAY_FINISH("订单已支付完成", 102),
    ORDER_NOT_ALLOW_REVOCATION("当前订单无法撤单", 103),
    ORDER_NOT_ALLOW_PAY("当前订单无法支付", 104),
    MEMBER_MONEY_IS_ZERO("用户资金为0", 105),
    ORDER_OUT_TIME("订单已超时", 106),
    ORDER_IS_ROLLBACK_FINISH("订单已撤销", 107),
    ORDER_IS_PAY_FAIL("订单无法继续支付", 108),
    ORDER_CANCEL_AUTH_REQUIRED("订单撤销需要授权", 109),
    NOT_CANCEL_PERMISSION("无订单撤销权限", 110),
    CREATE_CODE_ERROR("生成图片验证码错误", 111),
    INVALID_CODE("验证码错误", 112),
    INVALID_CODE_NOEXIST("验证码不存在", 113),
    EXSITING_CODE("验证码已存在", 114),
    NONE_USER("用户不存在", 120),
    EXSITING_USER("用户已存在", 121),
    NONE_USER_ROLE("用户角色不存在", 122),
    BLOCKED_USER("用户已被冻结", 123),
    MODILE_EXIST("该手机号码已被注册", 124),
    MOBILE_NOT_EMPTY("手机号码为空", 125),
    MOBILE_FORMAT_ERR("手机号码格式错误", 126),
    MOBILE_NOT_REGISTER("手机号未注册", 127),
    USERNAME_FORMAT_ERROR("用户名格式错误", 128),
    MOBILE_NOT_BIND("还没绑定手机号", 129),
    PASSWORD_ERROR("密码错误", 130),
    DOUBLE_PASSWORD_NOT_EQUALS("两次密码不一致！", 131),
    PASSWORD_ERROR_MAX("密码错误次数达到上限", 132),
    ACCOUNT_OR_PASSWORD_ERROR("账号或密码错误！", 133),
    PWDFOTMATERROR("密码不符合规范", 134),
    PASSWORD_NOT_EMPTY("密码不能为空", 135),
    NEWPASSWORD_NOT_EMPTY("新密码不能为空", 136),
    THIRDNOSUPPORT("第三方类型不支持", 140),
    IC_CARD_NOT_BIND("ic卡号错误或已被绑定", 141),
    THIRD_CODE_NOT_EMPTY("第三方code不能为空", 142),
    UNKNOWN_THIRD_ACCOUNT("未注册绑定任何账号", 143),
    ALIPAYPOWERROR("支付宝授权异常", 500),
    QQPOWERROR("QQ授权异常", 501),
    ALIPAYEXEERROR("支付宝请求失败", 502),
    ALIPAYCANCELERROR("支付宝撤销失败", 503),
    WECHATCANCELERROR("微信撤销失败", 504),
    ALIPAYBIND("账户已绑定支付宝账号", 505),
    QQBIND("账户已绑定QQ账号", 506),
    WECHATBIND("账户已绑定微信账号", 507),
    ALIPAYBINDOTHER("支付宝已绑定其它账户", 508),
    QQBINDOTHER("QQ号已绑定其它账户", 509),
    WECHATBINDOTHER("微信已绑定其它账户", 510),
    FTPOWERROR("饭帖授权异常", 511),
    AUTH_TIME_OUT("认证超时，请重新认证", 512),
    MACHINE_NO_BIND_SITE("机器没有绑定网点", 1021),
    NO_SITE_PERMISSION("没有该网点权限", 1022),
    NO_STALL_PERMISSION("没有档口权限", 1023),
    MACHINE_BIND_SITE("已绑定该网点，无需重复绑定", 1024),
    THIRDPAY_ONLY_ONE("第三方支付只能选择一个", 1031),
    THIRDPAY_MONEY("第三方需要支付金额", 1032),
    MONEY_NOENOUGH("余额不足", 1033),
    NO_FIND_THIRDPAY("第三方支付不存在", 1034),
    STATEERROR("状态错误", 10000),
    STATEERROR_DSH("不是待审核状态无法审核", 10001),
    STATE_NO_DELETE("当前状态不可删除", 10002),
    STATE_NO_CANCEL("审核通过的网点才可以注销", 10003),
    TXM_NOT_ALLOWED("非法二维码", 10005),
    TXM_ERROR("二维码验证错误,支付失败", 10006),
    TIME_BEGIN_ERR("开始时间不能为空", 10007),
    TIME_END_ERR("结束时间不能为空", 10008),
    TIME_NOT_EMPTY("时间段不能为空", 10009),
    CATER_NOT_EMPTY("餐饮集团不能为空", 10010),
    PAYORDERID_NOT_EMPTY("订单id不能为空", 10100),
    PAYORDER_NOT_EXIST("支付编号不存在,撤销失败", 10101),
    PAYORDER_CANCEL_FAIL("撤销失败", 10102),
    PAYORDER_NOT_THIRD("支付编号不是第三方支付", 10103),
    PAYORDER_FINISH_NO_CANCEL("订单支付已完成, 无法取消", 10104),
    PAYORDER_GOBACK_NO_CANCEL("订单支付已回滚，无法取消", 10105),
    PAYORDER_FAIL_NO_CANCEL("订单支付已失败，无法取消", 10106),
    DISH_ERROR_NEEDTCID("子菜单套餐父Id不能为空", 10200),
    DISH_ID_NOT_EMPTY("菜品id不能为空", 10201),
    DISH_NUM_NOT_EMPTY("菜品数量不能为空", 10202),
    DISH_PRICE_NOT_EMPTY("菜品单价不能为空", 10203),
    DISH_TOTAL_PRICE_NOT_EMPTY("菜品总费用不能为空", 10204),
    DISH_GUIGE_NAME_NOT_EMPTY("菜品规格名称不能为空", 10205),
    DISH_GUIGE_PRICE_NOT_EMPTY("菜品规格单价不能为空", 10206),
    DISH_TAOCAN_ID_NOT_EMPTY("套餐不能为空", 10207),
    DISH_CATEGORY_ID_NOT_EMPTY("分类ID不能为空", 10208),
    DISH_CATEGORY_NAME_NOT_EMPTY("分类名称不能为空", 10209),
    DISH_NAME_NOT_EMPTY("名称不能为空", 10210),
    COMPANY_ID_NOT_EMPTY("企业ID不能为空", 10300),
    COMPANY_NAME_NOT_EMPTY("企业名称不能为空", 10301),
    COMPANY_FAREN_NOT_EMPTY("企业法人不能为空", 10302),
    COMPANY_NAME_EXIST("企业名称已存在", 10303),
    COMPANY_ADDMONEY_NOT_EMPTY("金额不能为空", 10310),
    COMPANY_ADDMONEY_DELETE("请选择是否月底清空金额", 10311),
    SITE_ID_NOT_EMPTY("网点id不能为空", 10400),
    SITE_NAME_NOT_EMPTY("网点名称不能为空", 10401),
    SITE_NAME_EXIST("网点名称已存在!", 10402),
    COMPANY_IS_BIND("已绑定该企业!", 10403),
    STALL_ID_NOT_EMPTY("档口ID不能为空", 10500),
    ZIPCODE_IS_NOT_EMPTY("邮编不能为空", 10600),
    AREA_IS_NOT_EMPTY("地址不能为空", 10601),
    CONSIGNEE_IS_NOT_EMPTY("收货人不能为空", 10602),
    PHONE_IS_NOT_EMPTY("联系电话不能为空", 10603),
    ISDEFAULT_IS_NOT_EMPTY("是否默认不能为空", 10604),
    VOUCHER_IS_NOT_EXIST("卡劵不存在", 10701),
    VOUCHER_STOCK_IS_ZERO("卡劵剩余数量为0", 10702),
    INVALID_VOUCHER("无效的卡劵信息", 10703),
    MEMBER_VOUCHER_UNIQUE("该卡劵只可领取一次", 10704),
    OUTDATE_OF_TOKEN("登陆超时，请重新登陆（token超时）", 20004),
    FOUCE_OUT_OF_TOKEN("会话令牌因用户抢登失效", 20005),
    TOKEN_ERROR("会话验证错误", 20006),
    SECURITY_ERROR("非法的请求", 20007),
    UNAUTHORIZED("未认证", 20008),
    UNAUTHENTICATED("权限不足,无法访问", 20009),
    AUTH_FAIL("认证失败", 20010),
    LONGTIME_NOLOGIN("用户长时间未登录, 验证失败", 20011),
    ALIPAY_AUTH_FAIL("支付宝授权失败", 20012),
    ALIPAY_SIGN_ERROR("支付宝签名错误", 20013),
    QQ_AUTH_FAIL("QQ授权错误，登陆失败", 20014),
    SUCCESS("成功", 50000),
    EMPTY_DATA("无返回值", 50001),
    FAILURE("失败", 50002),
    BUSINESS_EXCEPTION("业务异常", 50003),
    PAY_FAIL("支付失败", 50004),
    PAY_FLJ_FAIL("福利金不足，支付失败", 50005),
    PAY_YE_FAIL("余额不足，支付失败", 50006),
    SERVER_INTERNAL_ERROR("服务端业务服务内部错误", -20000),
    ERROR_SELF_DATA("", -20001),
    INVALID_PARAMS("方法参数不正确", -32602),
    INVALID_JSON_RPC("内部JSON-RPC错误", -32603),
    USER_ERROR("用户认证失败", -200001),
    THIRD_ERROR_BEGIN("", -1000000),
    THIRD_ERROR_ALIPAY_EXECFAIL("支付宝执行失败", -1000001),
    THIRD_ERROR_WECHAT_EXECFAIL("微信执行失败", -1100001),
    THIRD_ERROR_WECHAT_LOGIN_NOTOKEN("微信登录no token", -1100002),
    THIRD_ERROR_WHCHAT_SIGNERROR("微信支付sign验证错误", -1100003),
    THIRD_ERROR_WHCHAT_CALCELRETERROR("微信取消返回失败", -1100004),
    THIRD_ERROR_WHCHAT_REFUNDRETERROR("微信退款返回失败", -1100005),
    THIRD_ERROR_WHCHAT_UNKNOWERR("微信支付未知错误", -1100999),
    PAY_ERROR_ALIPAY_PAYFAILURE("支付宝支付失败", -1101001),
    PAY_ERROR_ALIPAY_QUERYFAIL("支付宝查询失败", -1101011),
    PAY_ERROR_ALIPAY_CANCELFAIL("支付宝取消失败", -1101021),
    THIRD_ERROR_ALIPAY_UNKNOWERR("支付宝支付未知错误", -1101999),
    THIRD_ERROR_END("", -1110000),
    WEB_ERROR_BEGIN("", -1200000),
    WEB_ERROR_URLENCODE("urlencode失败", -1200001),
    WEB_ERROR_HTTPREQUESTFAIL("http请求失败", -1200002),
    WEB_ERROR_HTTPRESPONSETOSTRING("httpresponse获取失败", -1200003),
    WEB_ERROR_END("", -1300000),
    TOOLS_ERROR_BEGIN("", -1300000),
    TOOLS_ERROR_XML_PARSE("xml解析出错", -1300001),
    TOOLS_ERROR_XML_WRITE("写xml出错", -1300002),
    TOOLS_ERROR_XML_READ("读xml出错", -1300003),
    TOOLS_ERROR_END("", -1400000),
    BUSINESS_ERROR_BEGIN("", -10000000),
    BUSINESS_ERROR_END("", -100000000),
    SHOP_LOCK_USER_FAIL( "锁定用户失败",-10000001),
    SHOP_MEMORY_FAIL("锁定用户失败",-10000001),
    SHOP_ORDER_EXPIRED("订单已经过期无法操作",-10100001),
    SHOP_ORDER_LOCK( "订单被lock",-10100002),
    SHOP_ORDER_STATE_ERROR("订单状态错误",-10100003),
    SHOP_ORDERITEM_REFUND_ALREADY("订单项已经退款",-10200001),
    SHOP_REFUND_NOFIND("退款申请不存在",-11000001),
    SHOP_REFUND_STATE_NOT_pendingAudit("不是等待审核",-11000002),
    SHOP_REFUND_STATE_NOT_audited("不是审核通过",-11000003),
    SHOP_ARBITRATE_NOSELFREFUND("不是当前账号的退款请求无法请求仲裁",-12000001),
    SHOP_ARBITRATE_EXIST("已经请求过仲裁",-12000002),
    SHOP_ARBITRATE_NOEXIST("仲裁不存在",-12000003),
    WELFARE_MEMBER_ALREADY("用户已经绑定企业，请让用户取消后再次绑定！",-13000001);

    private String name;
    private int code;

    private ErrorCode(String name, int code) {
        this.name = name;
        this.code = code;
    }

    public String getName() {
        return this.name;
    }

    public int getCode() {
        return this.code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
